<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Progma" content="no-cache" />
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/mm_training.css" type="text/css" />
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/user.css" type="text/css" />
<link type="text/css" href="<%=request.getContextPath()%>/css/smoothness/jquery-ui-1.7.1.custom.css" rel="stylesheet" />
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/jquery/jquery-1.3.2.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/jquery/jquery-ui-1.7.1.custom.js"></script>
<script type="text/javascript">
	/** 重命名jQuery */
	$j = jQuery.noConflict();
</script>
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/prototype/prototype-1.6.0.3.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/XunjiaUtils.js"></script>
<script type="text/javascript">
	/**
	 *
	 * 打開註釋信息
	 *
	 */
	function showComment(id) {
		//$(id).style.display = "";
		Element.toggle($(id));
	}

	/**
	 *
	 * 隱藏註釋信息
	 *
	 */
	function hideComment(id) {
		//$(id).style.display = "none";
		Element.toggle($(id));
	}
</script>
<style type="text/css">
td {
	font-size: 12px;
}

span {
	color: red;
}

body {
	font-size: 12px;
}

.err_msg {
	color: red;
}
</style>
<title>用户注册</title>
</head>
<body bgcolor="#64748B">
<form action="<%=request.getContextPath()%>/registion/userDetail.do" enctype="application/x-www-form-urlencoded" id="registionForm" name="registionForm" method="POST">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr bgcolor="#26354A">
		<td width="15" nowrap="nowrap"><img src="<%=request.getContextPath()%>/images/mm_spacer.gif" alt="" width="15" height="1" border="0" /></td>
		<td height="70" colspan="3" class="logo" nowrap="nowrap">Yam廣告聯盟<span class="tagline">| yam of sichuan</span></td>
		<td width="40">&nbsp;</td>
		<td width="100%">&nbsp;</td>
	</tr>
	<tr bgcolor="#FF6600">
		<td colspan="6"><img src="<%=request.getContextPath()%>/images/mm_spacer.gif" alt="" width="1" height="4" border="0" /></td>
	</tr>
	<tr bgcolor="#D3DCE6">
		<td colspan="6"><img src="<%=request.getContextPath()%>/images/mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
	</tr>
	<tr bgcolor="#FFCC00">
		<td width="15" nowrap="nowrap">&nbsp;</td>
		<td width="705" colspan="3" height="24">
		<table border="0" cellpadding="0" cellspacing="0" id="navigation">
			<tr>
				<td class="navText" align="center" nowrap="nowrap"><a href="<%=request.getContextPath()%>/index.do">返回首页</a></td>
				<td class="navText" align="center" nowrap="nowrap"></td>
				<td class="navText" align="center" nowrap="nowrap"></td>
				<td class="navText" align="center" nowrap="nowrap"></td>
				<td class="navText" align="center" nowrap="nowrap"></td>
				<td class="navText" align="center" nowrap="nowrap"></td>
			</tr>
		</table>
		</td>
		<td width="40"></td>
		<td width="100%"></td>
	</tr>
	<tr bgcolor="#D3DCE6">
		<td colspan="6"><img src="<%=request.getContextPath()%>/images/mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
	</tr>
	<tr bgcolor="#FF6600">
		<td colspan="6"><img src="<%=request.getContextPath()%>/images/mm_spacer.gif" alt="" width="1" height="4" border="0" /></td>
	</tr>
	<tr bgcolor="#D3DCE6">
		<td width="230" valign="top" bgcolor="#26354a" colspan="2">
		<table width="230" bgcolor="#26354a" cellspacing="0" cellpadding="0" border="0">
			<tr>
				<td width="230" class="pageName">用户注册</td>
			</tr>
		</table>
		</td>
		<td width="50" valign="top"><img width="50" height="1" border="0" alt="" src="<%=request.getContextPath()%>/images/mm_spacer.gif" /></td>
		<td width="440" valign="top">
		<table width="721" border="0" bgcolor="#D3DCE6" align="center" cellpadding="0" cellspacing="0">
			<tr>
				<td width="51%" align="left" style="color: red; font-size: 14px;">申请人基本信息</td>
			</tr>
			<tr>
				<td align="left">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>

						<th align="right" scope="row">
						<table width="150" border="0" cellspacing="3" cellpadding="0">
							<tr>
								<td align="right" scope="col"><span class="style1 style10">*</span> 姓名：</td>
							</tr>
						</table>
						</th>
						<td width="80%">
						<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<th width="35%" align="left" scope="col"><input name="name" type="text" class="search" id="name" maxlength="50" size="25" value="<s:property value='name'/>"><span id="err_msg_name" class="err_msg"><s:fielderror cssClass="error_msg" fieldName="name" /></span></th>
							</tr>
						</table>
						<label for="textfield"></label></td>
					</tr>

					<tr>
						<th align="right" scope="row">
						<table width="100" border="0" cellspacing="3" cellpadding="0">
							<tr>
								<td align="right" scope="col"><span class="style10">*</span> 電話：</td>
							</tr>
						</table>
						</th>
						<td>
						<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">

							<tr>
								<th width="35%" align="left" scope="col"><input name="phone" type="text" class="search" value="<s:property value='phone'/>" id="phone" maxlength="30" size="25" onfocus="showComment('table1')" onblur="hideComment('table1')" /> <span id="err_msg_phone" class="err_msg"><s:fielderror fieldName="phone" /></span></th>
							</tr>
						</table>
						</td>
					</tr>

					<tr id="table1" style="display: none;">
						<td align="right" scope="row">&nbsp;</td>
						<td>
						<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<th align="left" scope="col">
								<table width="130" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
									<tr>
										<th bgcolor="#FFFCD9">
										<table width="100%" border="0" align="center" cellpadding="0" cellspacing="5">
											<tr>

												<td class="style9" scope="col" nowrap="nowrap">範例：886 2 26668888(台灣)或者028-88888888(大陸)</td>
											</tr>
										</table>
										</th>
									</tr>
								</table>
								</th>
							</tr>
						</table>
						</td>
					</tr>
					<tr>
						<th align="right" scope="row">
						<table width="100" border="0" cellspacing="3" cellpadding="0">
							<tr>
								<td align="right" scope="col"><span class="style10">*</span> 電子郵件：</td>
							</tr>
						</table>
						</th>

						<td>
						<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<th align="left" scope="col"><input name="email" type="text" class="search" value="<s:property value='email'/>" id="email" size="25" onfocus="showComment('table2')" onblur="hideComment('table2')"><span id="err_msg_email" class="err_msg"><s:fielderror fieldName="email" /></span></th>
							</tr>
						</table>
						</td>
					</tr>
					<tr>
						<th align="right" scope="row">
						<table width="100" border="0" cellspacing="3" cellpadding="0">
							<tr>
								<td align="right" scope="col"><span class="style10">*</span> 确认電子郵件：</td>
							</tr>
						</table>
						</th>

						<td>
						<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<th align="left" scope="col"><input name="confirm_email" type="text" value="<s:property value='confirm_email'/>" class="search" id="confirm_email" size="25" onfocus="showComment('table2')" onblur="hideComment('table2')"><span id="err_msg_confirm_email" class="err_msg"><s:fielderror fieldName="confirm_email" /></span></th>
							</tr>
						</table>
						</td>
					</tr>
					<tr id="table2" style="display: none;">
						<th align="right" scope="row">&nbsp;</th>
						<td>
						<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<th align="left" scope="col">
								<table width="145" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
									<tr>
										<th bgcolor="#FFFCD9" scope="col">
										<table width="100%" border="0" align="center" cellpadding="0" cellspacing="5">
											<tr>
												<td class="style9" scope="col" nowrap="nowrap">範例：win@xun-jia.com</td>
											</tr>
										</table>
										</th>
									</tr>
								</table>
								</th>
							</tr>
						</table>
						</td>
					</tr>
					<tr>
						<th align="right" scope="row">
						<table width="100" border="0" cellspacing="3" cellpadding="0">
							<tr>
								<td align="right" scope="col">傳真：</td>
							</tr>
						</table>
						</th>

						<td>
						<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<th align="left" scope="col"><input name="fax" type="text" value="<s:property value='fax'/>" class="search" id="fax" maxlength="15" size="25"><span id="err_msg_fax" class="err_msg"><s:fielderror fieldName="fax" /></span></th>
							</tr>
						</table>
						</td>
					</tr>
					<tr>
						<th align="right" scope="row">
						<table width="100" border="0" cellspacing="3" cellpadding="0">
							<tr>

								<td align="right" scope="col"><span class="style10">*</span> 手機號碼：</td>
							</tr>
						</table>
						</th>
						<td>
						<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<th align="left" scope="col"><input name="mobile" type="text" class="search" value="<s:property value='mobile'/>" id="mobile" maxlength="10" size="25" onfocus="showComment('table3')" onblur="hideComment('table3')"><span id="err_msg_mobile" class="err_msg"><s:fielderror fieldName="mobile" /></span></th>
							</tr>
						</table>
						</td>
					</tr>
					<tr id="table3" style="display: none;">
						<th align="right" scope="row">&nbsp;</th>
						<td>
						<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<th align="left" scope="col">
								<table width="265" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
									<tr>
										<th bgcolor="#FFFCD9" scope="col">

										<table width="100%" border="0" align="center" cellpadding="0" cellspacing="5">
											<tr>
												<td class="style9" scope="col">需以13開始，後跟8位阿拉伯數字(0-9)&#13;</td>
											</tr>
										</table>
										</th>
									</tr>
								</table>
								</th>
							</tr>

						</table>
						</td>
					</tr>
				</table>
				</td>
			</tr>
			<tr>
				<td align="left" background="images/0213pic_1_21.gif" style="color: red; font-size: 14px;">基本信息</td>
			</tr>
			<tr>
				<td align="left">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<th align="right" scope="row">
						<table width="150" border="0" cellspacing="3" cellpadding="0">
							<tr>
								<td width="121" align="right" scope="col"><input type="radio" name="type" id="type1" value="1" <s:if test="type == 1">checked="checked"</s:if> /> <span class="style10">*</span>個人戶身份證字號：</td>
							</tr>
						</table>
						</th>
						<td>
						<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<th align="left" scope="col"><input name="idcard" type="text" class="search" id="idcard" value="<s:property value='idcard'/>" size="25" onfocus="showComment('table6')" onblur="hideComment('table6')"><span id="err_msg_idcard" class="err_msg"><s:fielderror fieldName="idcard" /></span></th>
							</tr>
						</table>
						</td>
					</tr>
					<tr id="table6" style="display: none;">
						<th align="right" scope="row">&nbsp;</th>
						<td>
						<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<th align="left" scope="col">
								<table width="350" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
									<tr>

										<th bgcolor="#FFFCD9" scope="col">
										<table width="100%" border="0" align="center" cellpadding="0" cellspacing="5">
											<tr>
												<td class="style9" scope="col">1. 會以掛號方式寄送三聯式發票至您的註冊地址<br>
												2. 開立發票會依據您註冊時所提供的資訊為主（發票抬頭及統一編號）。一旦確認您的發票資訊並確認您已完成付款後，發票將會立即開立完成。本公司不提供更換發票資訊的服務。註冊時請務必確認發票資訊輸入無誤。</td>
											</tr>
										</table>
										</th>
									</tr>

								</table>
								</th>
							</tr>
						</table>
						</td>
					</tr>
					<tr>
						<th align="right" scope="row">
						<table width="150" border="0" cellspacing="3" cellpadding="0">
							<tr>
								<td width="121" align="right" scope="col"><input type="radio" name="type" id="type2" value="2" <s:if test="type == 2">checked="checked"</s:if> /> <span class="style10">*</span>公司 統一編號：</td>
							</tr>
						</table>
						</th>
						<td>
						<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<th align="left" scope="col"><input name="serialnumber" type="text" value="<s:property value='serialnumber'/>" class="search" id="serialnumber" size="25" onfocus="showComment('table5')" onblur="hideComment('table5')"><span id="err_msg_serialnumber" class="err_msg"><s:fielderror fieldName="serialnumber" /><s:fielderror fieldName="type" /></span></th>
							</tr>
						</table>
						</td>
					</tr>

					<tr id="table5" style="display: none;">
						<th align="right" scope="row">&nbsp;</th>
						<td>
						<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<th align="left" scope="col">
								<table width="350" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
									<tr>

										<th bgcolor="#FFFCD9" scope="col">
										<table width="100%" border="0" align="center" cellpadding="0" cellspacing="5">
											<tr>
												<td class="style9" scope="col">1. 會以掛號方式寄送三聯式發票至您的註冊地址<br>
												2. 開立發票會依據您註冊時所提供的資訊為主（發票抬頭及統一編號）。一旦確認您的發票資訊並確認您已完成付款後，發票將會立即開立完成。本公司不提供更換發票資訊的服務。註冊時請務必確認發票資訊輸入無誤。</td>
											</tr>
										</table>
										</th>
									</tr>

								</table>
								</th>
							</tr>
						</table>
						</td>
					</tr>

					<tr>
						<th align="right" scope="row">
						<table width="150" border="0" cellspacing="3" cellpadding="0">
							<tr>
								<td align="right" scope="col"><span class="style10">*</span> 個人/公司戶全名：<br>

								（發票抬頭）<br>
								</td>
							</tr>
						</table>
						</th>
						<td height="5" valign="top">
						<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<th width="35%" height="30" align="left" scope="col"><input name="corporationname" value="<s:property value='corporationname'/>" type="text" class="search" id="corporationname" maxlength="100" size="25"><span id="err_msg_corporationname" class="err_msg"><s:fielderror fieldName="corporationname" /></span></th>
							</tr>
						</table>
						</td>
					</tr>

					<tr>
						<th align="right" scope="row">
						<table width="150" border="0" cellspacing="3" cellpadding="0">
							<tr>
								<td align="right" scope="col"><span class="style10">* </span>縣市：</td>
							</tr>
						</table>
						</th>
						<td>
						<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<th align="left" scope="col"><select name="city" id="city">
									<option value="1">台湾</option>
									<option value="2">大陆</option>
								</select></th>
							</tr>
						</table>
						</td>
					</tr>
					<tr>
						<th align="right" scope="row">
						<table width="150" border="0" cellspacing="3" cellpadding="0">
							<tr>
								<td align="right" scope="col"><span class="style10">*</span> 地址：</td>
							</tr>
						</table>
						</th>
						<td>
						<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<th width="70%" align="left" scope="col"><input name="address" value="<s:property value='address'/>" type="text" class="search" id="address" maxlength="50" size="35"><span id="err_msg_address" class="err_msg"><s:fielderror fieldName="address" /></span></th>
							</tr>
						</table>
						</td>
					</tr>

					<tr>
						<th align="right" scope="row">
						<table width="150" border="0" cellspacing="3" cellpadding="0">
							<tr>
								<td align="right" scope="col"><span class="style10">* </span>郵遞區號：</td>
							</tr>
						</table>
						</th>
						<td>
						<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<th align="left" scope="col"><input name="zip" type="text" class="search" value="<s:property value='zip'/>" id="zip" maxlength="12" size="10"><span id="err_msg_zip" class="err_msg"><s:fielderror fieldName="zip" /></span></th>
							</tr>
						</table>
						</td>
					</tr>
				</table>
				</td>
			</tr>
			<tr>
				<td width="51%" align="left" background="images/0213pic_1_21.gif"><input type="submit" id="registion" name="registion" value="下一步" /> <!--input type="button" id="registion" name="registion" value="注册" onclick="return registe();"/><input type="reset" id="reset" name="reset" value="重置"/--></td>
			</tr>
		</table>
		</td>
		<td width="40">&nbsp;</td>
		<td width="100%">&nbsp;</td>
	</tr>
	<tr bgcolor="#D3DCE6">
		<td colspan="6"><img src="<%=request.getContextPath()%>/images/mm_spacer.gif" width="1" height="1" border="0" /></td>
	</tr>
</table>
</form>
<script type="text/javascript">
	/**
	 *
	 *	下一页面点击'上一步',取出保存值
	 *
	 *
	 */
	function init() {
		try {
			// 注册类型值(个人,企业)
			var typeVal = CookieUtils.getStringValue('COOKIE_REGISTE_TYPE');
			if (!StringUtils.isEmpty(typeVal)) {
				// 选中
				$("type" + typeVal).checked = true;
			}
			// 将COOKIE_USER_INFO值转换为JSON
			var cookieInfo = CookieUtils.getJSONValue('COOKIE_USER_INFO');
			var cookieCompanyInfo = CookieUtils
					.getStringValue('COOKIE_COMPANY_INFO');
			// 填充用户基本资料
			$("name").value = StringUtils.getString(cookieInfo.userName);
			$("phone").value = StringUtils.getString(cookieInfo.telphone);
			$("email").value = StringUtils.getString(cookieInfo.email);
			$("confirm_email").value = StringUtils.getString(cookieInfo.email);
			$("fax").value = StringUtils.getString(cookieInfo.faxNum);
			$("mobile").value = StringUtils.getString(cookieInfo.mobilephone);
			$("idcard").value = StringUtils.getString(cookieInfo.idCard);
			$("city").value = StringUtils.getString(cookieInfo.city);
			$("address").value = StringUtils.getString(cookieInfo.address);
			$("zip").value = StringUtils.getString(cookieInfo.zipCode);
			if (StringUtils.isEmpty(cookieCompanyInfo)) {
				$("corporationname").value = StringUtils
						.getString(cookieInfo.fullName);
			}
			// 将COOKIE_COMPANY_INFO值转换为JSON
			var companyInfo = CookieUtils.getJSONValue('COOKIE_COMPANY_INFO');//tempCookieArray[1].evalJSON();
			// 填充公司基本资料
			$("serialnumber").value = StringUtils
					.getString(companyInfo.companyNO);
			$("corporationname").value = StringUtils
					.getString(companyInfo.companyName);
		} catch (e) {
			DocumentWriter.writeln(e.description);
		}
	}

	init();
</script>
</body>
</html>